package Chatter::API::Schema::Result::Tweet;

# Created by DBIx::Class::Schema::Loader
# DO NOT MODIFY THE FIRST PART OF THIS FILE

use strict;
use warnings;

use Moose;
use MooseX::NonMoose;
use namespace::autoclean;
extends 'DBIx::Class::Core';

# disable for Catalyst::View::JSON
#__PACKAGE__->load_components("InflateColumn::DateTime");

__PACKAGE__->table("tweet");

__PACKAGE__->add_columns(
  "Id",
  { data_type => "varchar", is_nullable => 0, size => 200 },
  "type",
  { data_type => "varchar", is_nullable => 0, size => 6 },
  "threadId",
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 100 },
  "replyId",
  { data_type => "varchar", is_nullable => 1, is_nullable => 1, size => 100 },
  "accountId",
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 100 },
  "groupId",
  { data_type => "varchar", is_nullable => 1, size => 100 },
  "tweet",
  { data_type => "text", is_nullable => 0 },
  "posted",
  {
    data_type     => "timestamp",
    default_value => \"current_timestamp",
    is_nullable   => 0,
  },
  "url",
  { data_type => "varchar", is_nullable => 1, size => 1000 },
);
__PACKAGE__->set_primary_key("Id");

__PACKAGE__->belongs_to(
  "account",
  "Chatter::API::Schema::Result::Account",
  { accountId => "accountId" },
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
);

__PACKAGE__->belongs_to(
  "thread",
  "Chatter::API::Schema::Result::Thread",
  { threadId => "threadId" },
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
);

__PACKAGE__->belongs_to(
  "reply",
  "Chatter::API::Schema::Result::Reply",
  { replyId => "replyId" },
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
);

__PACKAGE__->meta->make_immutable;
1;
